package com.technology.education.ui.student.home

import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.callback.databind.BooleanObservableField
import me.hgj.jetpackmvvm.callback.databind.StringObservableField

class HomeViewModel : BaseViewModel() {
    val status = StringObservableField("获取中")
    val showMenu = BooleanObservableField(false)

    /**
     * 更换当前状态
     */
    fun changeStatus(type: Int) {
        showMenu.set(false)
        status.set(if (type == 0) "接单中" else "休息中")
    }

    /**
     * 切换状态菜单展示
     */
    fun toggleMenu() {
        showMenu.set(!showMenu.get())
    }
}